package com.siao.errors
{
	
	/**
	 * 状态错误
	 * @author SiaoLeon
	 */
	public class StateError extends Error
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		/**
		 * 未找到
		 */
		public static const NOTFOUND:String = "notfound";
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function StateError(type:String, key:Object=null)
		{
			var msg:String = type;
			
			switch (type)
			{
				case NOTFOUND:
					msg = "未找到标识为" + key + "的状态";
					break;
			}
			
			super(msg);
		}
	
		// -------------------------------------------------------------------------------------------------------- 方法
	
		// -------------------------------------------------------------------------------------------------------- 函数
	
	}
}
